package basic_1019;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner scanner=new Scanner(System.in);
		
		String input=scanner.next().toUpperCase();
		String output=scanner.next().toUpperCase();
	
		scanner.close();
		
		List<Character>badKeys=new ArrayList<Character>();
		
		int ii=0;int oi=0;
		while(ii<input.length()) {
			if(oi<output.length()&&input.charAt(ii)==output.charAt(oi)) {
				ii++;
				oi++;
			}else {
				if(!badKeys.contains(input.charAt(ii))){
					badKeys.add(input.charAt(ii));
				}
				ii++;
			}
		}
		StringBuffer buffer=new StringBuffer();
		for(char c :badKeys) {
			buffer.append(c);
		}
		System.out.println(buffer.toString());
	}
}
